<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>


<!DOCTYPE html>
<html lang="ko">
<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>urERP</title>

	<jsp:include page="script_header.jsp"/>
</head>
<body>
	<div id="wrapper">
	 	<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
			<header>
		        <jsp:include page="nav_header.jsp"/>
		        <jsp:include page="nav_sidebar.jsp"/>
		    </header>
	 	</nav>
	    <div id="page-wrapper">
	    	<div class="row">
	    		<div class="col-lg-12">
				    <h3 class="page-header">${pageHeader}</h3>
				</div>
				<div class="row">
					<div class="col-lg-12">
						<div id="alert_placeholder" style="display:none;"></div>
					</div>
				</div>
		    	<jsp:include page="${partial}"/>
            </div>
	    </div>
	</div>
	
	<jsp:include page="script_footer.jsp"/>
	
	<!-- 메시지 모달창 -->
	<input type="hidden" id="alert_action_flag" name="alert_action_flag"/>
	<div class="modal fade" id="msgPop">
		<div class="modal-dialog modal-sm">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"> ×</button>
					<h4 class="modal-title">안내</h4>
				</div>
				<div class="modal-body" id="msgBody">
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal" id="alert_close">닫기</button>
				</div>
			</div>
		</div>
	</div>
	
	<script>
		$('#alert_close').on("click", function() {
			var _cFlag = $('#alert_action_flag').val();

			switch(_cFlag) {
				case "LIST" : 
					oTable.fnStandingRedraw();
					TableTools.fnGetInstance("datatable_list").fnSelectNone();
					$('#doc-modal').hide();
					break;
				case "RELOAD" : 
					location.reload();
					break;
				case "LOGOUT" :
					goPage("/");
					break;
				default :
					break;
			}
			
		});
	</script>
</body>
</html>